package org.neuedu.chapter06_0622.demo04;

public class Test {
    public static void main(String[] args) {
        Emp emp = new Emp();
        emp.setEmpno(7369);
        emp.setEname("SMITH");
        emp.setJob("CLERK");

        Dept dept = new Dept();
        dept.setDeptno(10);
        dept.setDname("SALES");
        dept.setLoc("CHICAGO");

        emp.setDept(dept);

        Dept dept1 = emp.getDept();
        System.out.println(dept1.getDname());
        System.out.println(dept1.getLoc());
    }
}
